package xx.rabbitmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import static xx.rabbitmq.conf.ConfirmConfig.CONFIRM_QUEUE;

@Slf4j
@Component
public class ConfirmConsumer {

    @RabbitListener(queues = CONFIRM_QUEUE)
    public void process(Message message) {
        String msg = new String(message.getBody());
        log.info("接受到的队列confirm.queue消息:{}", msg);
    }
}
